﻿using System.Collections.Generic;
using System.Linq;
using Scrabble.Model.Properties;

namespace Scrabble.Model.Events
{
    internal class PointsDeductedEvent : GameEvent
    {
        public PointsDeductedEvent(IPlayer player, IEnumerable<Tile> remainingTiles)
            : base(player, - remainingTiles.Aggregate(0, (result, tile) => result + tile.Points), remainingTiles)
        {
            Description = Resources.Description_Deduction;
        }

        protected override string TypeOfAction
        {
            get { return ActionType.Deduct; }
        }
    }
}